package cn.imnaer.service.rpc.common;

import java.util.List;

import cn.imnaer.service.Interceptor.CommonInterceptor;
import cn.imnaer.service.persistence.model.FriendRelation;

public class CommonIntercept {

	public static void supportIntercept(List<CommonInterceptor> list, List<String> hasPermissionUsers) {

		for (CommonInterceptor commonInterceptor : list) {

			commonInterceptor.supportInterceptor(hasPermissionUsers);
		}

	}

	public static void collectIntercept(List<CommonInterceptor> list, List<String> collectIds) {

		for (CommonInterceptor commonInterceptor : list) {

			commonInterceptor.collectInterceptor(collectIds);
		}

	}

	public static void userNameIntercept(List<? extends CommonInterceptor> list, List<FriendRelation> friendRelations) {

		for (CommonInterceptor commonInterceptor : list) {

			commonInterceptor.userNameInterceptor(friendRelations);
		}

	}

	public static void supportIntercept(CommonInterceptor commonInterceptor, List<String> hasViewPermissionUsers) {

		commonInterceptor.supportInterceptor(hasViewPermissionUsers);

	}

	public static void collectIntercept(CommonInterceptor commonInterceptor, List<String> collectIds) {

		commonInterceptor.collectInterceptor(collectIds);

	}

	public static void userNameIntercept(CommonInterceptor commonInterceptor, List<FriendRelation> friendRelations) {

		commonInterceptor.userNameInterceptor(friendRelations);

	}
}
